package com.newx.common.core.enums.business;

import java.util.Arrays;
import java.util.LinkedHashMap;

/**
 * 帐变类型枚举
 */

public enum RecordEnum {
    RECHARGE_ADD(10, "充值+"),
    WITHDRAW_SUB(11, "提现-"),
    WITHDRAWAL_FAILED_ADD(12, "提现失败+"),
    CURRENCY_CONVERSION_ADD(13, "币种兑换+"),
    CURRENCY_CONVERSION_SUB(14, "币种兑换-"),
    BONUS_ADD(20, "赠送彩金+"),
    BONUS_SUB(21, "扣减彩金-"),
    SEND_SUB(30, "人工下分-"),
    SEND_ADD(31, "人工上分+"),
    DEMO_ADD(32, "增加模拟资金+"),

    OPTION_BETTING_SUB(40, "秒合约下注-"),
    OPTION_SETTLEMENT_ADD(41, "秒合约结算+"),
    CONTRACT_TRANSACTION_SUB(42, "合约交易-"),
    CONTRACT_TRANSACTION_CLOSING(43, "合约交易平仓"),
    CONTRACT_TRADING_CAPITAL_CLOSE_STOP(44, "余额不足强平"),
    CONTRACT_TRADING_CLOSE_STOP(45, "合约交易强平"),
    CONTRACT_ADD(46, "追加合约本金+"),
    CONTRACT_AMOUNT_ADD(47, "追加保证金+"),
    CONTRACT_AMOUNT_SUB(48, "减少保证金-"),
    CONTRACT_TRADING_CAPITAL_SUB(49, "资金费率-"),
    CONTRACT_TRADING_PROFIT_AND_LOSS(50, "止盈止损"),


    CURRENCY_TRADING_ADD(60, "现货交易+"),
    CURRENCY_TRADING_SUB(61, "现货交易-"),
    CURRENCY_DELEGATE_TRADING_ADD(62, "现货委托交易撤单+"),
    CURRENCY_DELEGATE_TRADING_SUB(63, "现货委托交易-"),
    FUND_TRANSFER_ADD(69, "资金划转+"),
    FUND_TRANSFER_SUB(70, "资金划转-"),
    ASSET_ACCOUNT_ADD(71, "资产账户+"),
    ASSET_ACCOUNT_SUB(72, "资产账户-"),
    TRANSACTION_ACCOUNT_ADD(73, "交易账户+"),
    TRANSACTION_ACCOUNT_SUB(74, "交易账户-"),

    FINANCIAL_PURCHASE_SUB(80, "理财购买-"),
    FINANCIAL_SETTLEMENT_ADD(81, "理财结算+"),
    FINANCIAL_REDEMPTION(82, "理财赎回"),

    SUBORDINATE_RECHARGE_REBATE(90, "下级充值返利"),
    SUBORDINATE_MINING_REBATE(91, "下级挖矿返利"),
    FINANCIAL_REBATE(92, "下级理财返利"),

    MINING_TO_BUY(100, "挖矿购买"),
    MINING_REBATE(101, "挖矿返息"),
    MINING_REDEMPTION(102, "挖矿赎回"),
    MINING_SETTLEMENT(103, "挖矿结算"),
    NON_STAKING_MINING_INCOME(104, "矿池收益"),
    AIRDROP_EVENT_REWARDS(105, "空投活动奖励"),
    DEFI_ACTIVITY(106, "空投活动"),
    DEFI_ORDER(107, "defi挖矿"),


    LOAD_ORDER(120, "助力贷"),
    OWN_COIN_BUY(121, "新币申购")

    ;
    private final Integer code;
    private final String desc;

    RecordEnum(Integer code, String info) {
        this.code = code;
        this.desc = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return desc;
    }


    public static LinkedHashMap<Integer, String> getMap() {
        LinkedHashMap<Integer, String> map = new LinkedHashMap<>();
        Arrays.stream(RecordEnum.values()).forEach(recordEnum -> {
            map.put(recordEnum.getCode(), recordEnum.getInfo());
        });
        return map;

    }

    public static void main(String[] args) {
        LinkedHashMap<Integer, String> map = getMap();
        System.out.println(map);
    }
}
